<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引入bootstrap.css -->
    <link rel="stylesheet" href="../css/bootstrap.min.css">
</head>

<body>
    <!-- 2，准备弹框标签，确认结构 -->
    <!-- 
        btn btn-primary为Bootstrap的按钮属性， 可参考：https://v5.bootcss.com/docs/components/buttons/ 
        里面有很多按钮样式。

     -->
    <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target=".my-box">显示弹框</button>
    <!-- 在弹框外的关闭按钮 -->
    <button type="button" class="btn btn-primary" data-bs-dismiss="modal" data-bs-target=".my-box">关闭弹框</button>


    <!-- 复制官方示例代码 弹框标签-->
    <div class="modal my-box" tabindex="-1">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">Modal title</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <p>Modal body text goes here.</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
                    <button type="button" class="btn btn-primary">Save changes</button>
                </div>
            </div>
        </div>
    </div>
    <!-- 引入bootstrap.js -->
    <script src="../js/bootstrap.min.js"></script>
</body>

</html>